import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/',
      name: 'login',//登录
      component: () => import('../views/Store/Login.vue'),
    },
    {
      path: '/addstore',
      name: 'addstore',//录入门店
      component: () => import('../views/Store/AddStore.vue'),
    },
    {
      path: '/showall',
      name: 'showall',//首页
      component: () => import('../views/ShowAll.vue'),
    },
    {
      path: '/showstore',
      name: 'showstore',//显示门店
      component: () => import('../views/Store/ShowStore.vue'),
    },
    {
      path: '/updstore',
      name: 'updstore',//修改门店
      component: () => import('../views/Store/UpdStore.vue'),
    },
     {
      path: '/addprice',
      name: 'addprice',//录入房价
      component: () => import('../views/Price/AddPrice.vue'),
    },
    {
      path: '/showprice',
      name: 'showprice',//显示房价
      component: () => import('../views/Price/ShowPrice.vue'),
    },
    {
      path: '/updprice',
      name: 'updprice',//修改房价updprice
      component: () => import('../views/Price/UpdPrice.vue'),
    },
    {
      path: '/addhouse',
      name: 'addhouse',//录入房号
      component: () => import('../views/House/AddHouse.vue'),
    },
    {
      path: '/showhouse',
      name: 'showhouse',//显示房号
      component: () => import('../views/House/ShowHouse.vue'),
    },
  ],
})

export default router
